package com.example.menuvirtualclient.rule;

import java.util.List;

import android.content.Context;


import com.example.menuvirtualclient.core.Enquiry;
import com.example.menuvirtualclient.data.ISession;
import com.example.menuvirtualclient.data.SessionFactory;
import com.example.menuvirtualclient.repository.EnquiryRepository;

public class EnquiryRule {

	private ISession _session;
	private final EnquiryRepository _repository;

	public EnquiryRule(Context context) {
		_session = SessionFactory.GetSession(context);
		_repository = new EnquiryRepository(context);
	}
	
	public List<Enquiry> GetList() throws Exception{
		try{
			_session.Open();
			return _repository.GetAll();
		}
		catch(Exception ex){
			throw ex;
		}
		finally{
			_session.Close();
		}
	}

	
}
